PSelect

Selects a text block or graphic by drawing order or by location. The syntax you use for the command depends upon whether you specify the object by its draw ing order or by its coordinates:


Command constructors

This command has two constructors. You may select based on x/y location or by drawing order.

PSelect(long x, long y);

long x;
x-coordinate of the object, relative to the current zero point number in twips
long y;
y-coordinate of the object, relative to the current zero point in twips
PSelect(long drawOrder);
long drawOrder;
The drawing order number for the object.
Using the location method of selection. Selecting an object with x and y coordinates (the location method) is identical to selecting the object with the mouse. Your choice of allowable coordinates depends upon the type of object: Drawing order. The drawing order is determined by the order in which objects are drawn, inserted, pasted, or placed on the page. Note that some commands, such as Send to Back and Send to Front on the Arrange menu and moving or resizing an object with the mouse, can also affect drawing order.

No drawing order for inline graphics. Inline graphics are not assigned a drawing order and must be selected using the location method.

Selecting text. To select (highlight) text, use the PTextSelect command.

Layout view only. The PSelect command works only in layout view.

Example. The following example selects the second object drawn.

PSelect(2);

The following example selects the object positioned 1 inch to the right on the x axis and 4 inches down on the y-axis.

PSelect(twips("1i"), twips("4i"));


See also

The PSelectAll, PSelectExtend, and PTextSelect commands

The PGetSelectInfo and PGetSelectList queries


Copyright © 1996, Adobe Systems Incorporated. All rights reserved.

Comments or suggestions? Contact Adobe Developer Support